//运行时编译
const babel = require('@babel/core')

const code = `
const hello = () => {
    console.log('hello babel')
}

hello()
`

const options = {

}
const result = babel.transform(code, options)
console.log(result.code)